﻿using System;
using System.Threading.Tasks;

namespace Abp.Net.Sms
{
    /// <summary>
    /// Sms Sender
    /// </summary>
    public interface ISmsSender
    {
        /// <summary>
        /// Send sms
        /// </summary>
        /// <param name="to"></param>
        /// <param name="templateCode"></param>
        /// <param name="templateParams"></param>
        /// <param name="freeSignName"></param>
        /// <param name="sendTime"></param>
        void Send(string to, string templateCode, object[] templateParams, string freeSignName = "", DateTime? sendTime = null);

        /// <summary>
        /// Send sms async
        /// </summary>
        /// <param name="to"></param>
        /// <param name="templateCode"></param>
        /// <param name="templateParams"></param>
        /// <param name="freeSignName"></param>
        /// <param name="sendTime"></param>
        /// <returns></returns>
        Task SendAsync(string to, string templateCode, object[] templateParams, string freeSignName = "", DateTime? sendTime = null);

        /// <summary>
        /// Send Sms
        /// </summary>
        /// <param name="sms"></param>
        void Send(SmsMessage sms);

        /// <summary>
        /// Send Sms
        /// </summary>
        /// <param name="sms"></param>
        /// <returns></returns>
        Task SendAsync(SmsMessage sms);
    }
}
